Optimal. Leaf size=418 \[ -\frac {3 i f (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}+\frac {3 i f (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}-\frac {6 f^2 (e+f x) \text {Li}_2\left (\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^3}+\frac {6 f^2 (e+f x) \text {Li}_2\left (\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^3}-\frac {6 i f^3 \text {Li}_3\left (\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^4}+\frac {6 i f^3 \text {Li}_3\left (\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^4}-\frac {(e+f x)^3}{b d (a+b \sin (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.57, antiderivative size = 418, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 7, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.269, Rules used = {4507, 3404,
2296, 2221, 2611, 2320, 6724} \begin {gather*} -\frac {6 i f^3 \text {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b d^4 \sqrt {a^2-b^2}}+\frac {6 i f^3 \text {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{\sqrt {a^2-b^2}+a}\right )}{b d^4 \sqrt {a^2-b^2}}-\frac {6 f^2 (e+f x) \text {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b d^3 \sqrt {a^2-b^2}}+\frac {6 f^2 (e+f x) \text {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{\sqrt {a^2-b^2}+a}\right )}{b d^3 \sqrt {a^2-b^2}}-\frac {3 i f (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b d^2 \sqrt {a^2-b^2}}+\frac {3 i f (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{\sqrt {a^2-b^2}+a}\right )}{b d^2 \sqrt {a^2-b^2}}-\frac {(e+f x)^3}{b d (a+b \sin (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2221
Rule 2296
Rule 2320
Rule 2611
Rule 3404
Rule 4507
Rule 6724
Rubi steps
\begin {align*} \int \frac {(e+f x)^3 \cos (c+d x)}{(a+b \sin (c+d x))^2} \, dx &=-\frac {(e+f x)^3}{b d (a+b \sin (c+d x))}+\frac {(3 f) \int \frac {(e+f x)^2}{a+b \sin (c+d x)} \, dx}{b d}\\ &=-\frac {(e+f x)^3}{b d (a+b \sin (c+d x))}+\frac {(6 f) \int \frac {e^{i (c+d x)} (e+f x)^2}{i b+2 a e^{i (c+d x)}-i b e^{2 i (c+d x)}} \, dx}{b d}\\ &=-\frac {(e+f x)^3}{b d (a+b \sin (c+d x))}-\frac {(6 i f) \int \frac {e^{i (c+d x)} (e+f x)^2}{2 a-2 \sqrt {a^2-b^2}-2 i b e^{i (c+d x)}} \, dx}{\sqrt {a^2-b^2} d}+\frac {(6 i f) \int \frac {e^{i (c+d x)} (e+f x)^2}{2 a+2 \sqrt {a^2-b^2}-2 i b e^{i (c+d x)}} \, dx}{\sqrt {a^2-b^2} d}\\ &=-\frac {3 i f (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}+\frac {3 i f (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}-\frac {(e+f x)^3}{b d (a+b \sin (c+d x))}+\frac {\left (6 i f^2\right ) \int (e+f x) \log \left (1-\frac {2 i b e^{i (c+d x)}}{2 a-2 \sqrt {a^2-b^2}}\right ) \, dx}{b \sqrt {a^2-b^2} d^2}-\frac {\left (6 i f^2\right ) \int (e+f x) \log \left (1-\frac {2 i b e^{i (c+d x)}}{2 a+2 \sqrt {a^2-b^2}}\right ) \, dx}{b \sqrt {a^2-b^2} d^2}\\ &=-\frac {3 i f (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}+\frac {3 i f (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}-\frac {6 f^2 (e+f x) \text {Li}_2\left (\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^3}+\frac {6 f^2 (e+f x) \text {Li}_2\left (\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^3}-\frac {(e+f x)^3}{b d (a+b \sin (c+d x))}+\frac {\left (6 f^3\right ) \int \text {Li}_2\left (\frac {2 i b e^{i (c+d x)}}{2 a-2 \sqrt {a^2-b^2}}\right ) \, dx}{b \sqrt {a^2-b^2} d^3}-\frac {\left (6 f^3\right ) \int \text {Li}_2\left (\frac {2 i b e^{i (c+d x)}}{2 a+2 \sqrt {a^2-b^2}}\right ) \, dx}{b \sqrt {a^2-b^2} d^3}\\ &=-\frac {3 i f (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}+\frac {3 i f (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}-\frac {6 f^2 (e+f x) \text {Li}_2\left (\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^3}+\frac {6 f^2 (e+f x) \text {Li}_2\left (\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^3}-\frac {(e+f x)^3}{b d (a+b \sin (c+d x))}-\frac {\left (6 i f^3\right ) \text {Subst}\left (\int \frac {\text {Li}_2\left (\frac {i b x}{a-\sqrt {a^2-b^2}}\right )}{x} \, dx,x,e^{i (c+d x)}\right )}{b \sqrt {a^2-b^2} d^4}+\frac {\left (6 i f^3\right ) \text {Subst}\left (\int \frac {\text {Li}_2\left (\frac {i b x}{a+\sqrt {a^2-b^2}}\right )}{x} \, dx,x,e^{i (c+d x)}\right )}{b \sqrt {a^2-b^2} d^4}\\ &=-\frac {3 i f (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}+\frac {3 i f (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}-\frac {6 f^2 (e+f x) \text {Li}_2\left (\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^3}+\frac {6 f^2 (e+f x) \text {Li}_2\left (\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^3}-\frac {6 i f^3 \text {Li}_3\left (\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^4}+\frac {6 i f^3 \text {Li}_3\left (\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^4}-\frac {(e+f x)^3}{b d (a+b \sin (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.05, size = 703, normalized size = 1.68 \begin {gather*} \frac {3 i f \left (2 \sqrt {a^2-b^2} d f (e+f x) \text {Li}_2\left (-\frac {b (\cos (2 c+d x)+i \sin (2 c+d x))}{i a \cos (c)+\sqrt {\left (-a^2+b^2\right ) (\cos (c)+i \sin (c))^2}-a \sin (c)}\right ) (\cos (c)+i \sin (c))-2 \sqrt {a^2-b^2} d f (e+f x) \text {Li}_2\left (\frac {b (\cos (2 c+d x)+i \sin (2 c+d x))}{-i a \cos (c)+\sqrt {\left (-a^2+b^2\right ) (\cos (c)+i \sin (c))^2}+a \sin (c)}\right ) (\cos (c)+i \sin (c))-i \left (-2 \sqrt {a^2-b^2} f^2 \text {Li}_3\left (-\frac {b (\cos (2 c+d x)+i \sin (2 c+d x))}{i a \cos (c)+\sqrt {\left (-a^2+b^2\right ) (\cos (c)+i \sin (c))^2}-a \sin (c)}\right ) (\cos (c)+i \sin (c))+2 \sqrt {a^2-b^2} f^2 \text {Li}_3\left (\frac {b (\cos (2 c+d x)+i \sin (2 c+d x))}{-i a \cos (c)+\sqrt {\left (-a^2+b^2\right ) (\cos (c)+i \sin (c))^2}+a \sin (c)}\right ) (\cos (c)+i \sin (c))+d^2 \left (\sqrt {a^2-b^2} f x (2 e+f x) \left (-\log \left (1+\frac {b (\cos (2 c+d x)+i \sin (2 c+d x))}{i a \cos (c)+\sqrt {\left (-a^2+b^2\right ) (\cos (c)+i \sin (c))^2}-a \sin (c)}\right )+\log \left (1-\frac {b (\cos (2 c+d x)+i \sin (2 c+d x))}{-i a \cos (c)+\sqrt {\left (-a^2+b^2\right ) (\cos (c)+i \sin (c))^2}+a \sin (c)}\right )\right ) (\cos (c)+i \sin (c))+2 e^2 \tan ^{-1}\left (\frac {b \cos (c+d x)+i (a+b \sin (c+d x))}{\sqrt {a^2-b^2}}\right ) \sqrt {\left (-a^2+b^2\right ) (\cos (2 c)+i \sin (2 c))}\right )\right )\right )}{b \sqrt {a^2-b^2} d^4 \sqrt {\left (-a^2+b^2\right ) (\cos (2 c)+i \sin (2 c))}}-\frac {(e+f x)^3}{b d (a+b \sin (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.98, size = 0, normalized size = 0.00 \[\int \frac {\left (f x +e \right )^{3} \cos \left (d x +c \right )}{\left (a +b \sin \left (d x +c \right )\right )^{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 2299 vs. \(2 (365) = 730\).
time = 0.56, size = 2299, normalized size = 5.50 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F(-1)]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \text {Hanged} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________